<div id="node-<?php print $node->nid; ?>" class="node<?php if ($sticky) { print ' sticky'; } ?><?php if (!$status) { print ' node-unpublished'; } ?>">

<?php if ($page == 0): ?>
  <h2><a href="<?php print $node_url ?>" title="<?php print $title ?>"><?php print $title ?></a></h2>
<?php endif; ?>

  <?php if ($submitted): ?>
    <span class="Submitted"><?php print $submitted; ?></span>
  <?php endif; ?>

  <div class="Content clear-block">
    <?php print $content ?>
    
		<?php
		
			/*
			
				This code uses the "Chart API" module to create a simple, on-the-fly pie chart using Google Charts.
				
				To use it all you need to do is:
				
				0	-	install "Chart API" module
				1	-	create a content-type called "chart" and 
				2	-	create a repeating integer/text CCK field and call it "field_chart_number"
			
			*/
		
			// Initalize array:
			$myarray = array();
			
			// Rework the field_percent array into a new array for easy parsing	
			foreach($node->field_chart_number as $key => $value) {
				$myarray[] = $value['view'];
		    };
		    
		    // Fire up the Chart API	
			$chart = array(
			  '#chart_id' => 'test_chart',
			  '#title' => $title,
			  '#type' => CHART_TYPE_PIE_3D,
			);
			
			// Create a new #data entry for each item in $myarray
			foreach($myarray as $key => $value) {
			
				$akey = "this" . $key;
				$chart['#data'][$akey] = $value;
			
			};	 
			
			// Render the chart
			echo chart_render($chart);
		
		?>
  
  </div>

  <div class="clear-block">
    <div class="Meta">
    <?php if ($taxonomy): ?>
      <div class="Terms"><?php print $terms ?></div>
    <?php endif;?>
    </div>

    <?php if ($links): ?>
      <div class="Links"><?php print $links; ?></div>
    <?php endif; ?>
  </div>

</div>